﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Linq.Mapping;
using Wolfbyte.Core;

namespace Wolfbyte.UnitOfWork.LinqToSql
{
    public class XmlMappingSourceFactory : IFactory<MappingSource>
    {
        private string MappingFileUrl;

        public XmlMappingSourceFactory(string MappingFileName)
        {
            this.MappingFileUrl = MappingFileName;
        }

        #region IFactory<MappingSource> Members

        public MappingSource Create()
        {
            return XmlMappingSource.FromUrl(MappingFileUrl);
        }

        #endregion
    }
}
